package com.lg.jna;

import com.sun.jna.Library;
import com.sun.jna.Native;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class JnaDemo {

    public static final CLibrary instance;

    public interface CLibrary extends Library {
        int Add(int a,int b);
        int Sub(int a,int b);
    }


    static {
        instance = (CLibrary) Native.load("Dll3" , CLibrary.class);
    }


     public static  void  seyHello(){
         int sum = instance.Add(3, 6);
         int sub = instance.Sub(3, 2);
         log.info("sum = " + sum);
         log.info("sub = " + sub);
     }


}
